package com.smm.web.vmc.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by zhenghao on 2016/8/26.
 * 报警记录对象
 */
@Entity
@Table(name="alam")
public class Alam implements Serializable {

    /**
     * 处理中状态
     */
    public static final  Short PROCESS_STATUS_NO=0;

    /**
     * 已处理状态
     */
    public static final  Short PROCESS_STATUS_YES=1;


    private int id;

    private Tag tag;            //报警标签

    private Date alamTime;    //报警时间

    private Short status=0;         //处理状态 0 处理中 ， 1 已处理  默认 0

    private String processDesc;     //处理意见

    private Date processTime;       //处理时间

    private String captureImageUrl; //抓拍图片访问地址

    private Receipt receipt;        //对应仓单对象


    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @ManyToOne
    @JoinColumn(name = "tag_no")
    public Tag getTag() {
        return tag;
    }

    public void setTag(Tag tag) {
        this.tag = tag;
    }


    public Date getAlamTime() {
        return alamTime;
    }

    public void setAlamTime(Date alamTime) {
        this.alamTime = alamTime;
    }

    public String getProcessDesc() {
        return processDesc;
    }

    public void setProcessDesc(String processDesc) {
        this.processDesc = processDesc;
    }

    public Date getProcessTime() {
        return processTime;
    }

    public void setProcessTime(Date processTime) {
        this.processTime = processTime;
    }


    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getCaptureImageUrl() {
        return captureImageUrl;
    }

    public void setCaptureImageUrl(String captureImageUrl) {
        this.captureImageUrl = captureImageUrl;
    }

    @ManyToOne
    @JoinColumn(name = "receipt_no")
    public Receipt getReceipt() {
        return receipt;
    }

    public void setReceipt(Receipt receipt) {
        this.receipt = receipt;
    }
}
